package cae.gui.conf;

import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import org.netbeans.validation.api.ui.ValidationPanel;

import cae.logic.util.CaeClipConfiguration;

public class CaeSincronizacion extends JPanel
{

	private static final long serialVersionUID = 1L;
	private static CaeClipConfiguration conf = CaeClipConfiguration.getInstance();

	public CaeSincronizacion(ValidationPanel pnl)
	{
		setLayout( new GridBagLayout() );
		GridBagConstraints gc = new GridBagConstraints();
		gc.insets = new Insets(2,2,2,2);
		gc.fill = GridBagConstraints.BOTH;
		gc.weightx = 0;
		gc.weighty = 0;
		
		Dimension d = new Dimension(200, 20);


		// CHAT
		gc.gridx = 0;
		gc.gridy = 0;
		add(new JLabel("URL Destinations: "), gc);
		String url = conf.getSProp(CaeClipConfiguration.URL_DEST_UPDATE);
		JTextField urlDest = new JTextField(url);
		urlDest.setPreferredSize(d);
		urlDest.setMaximumSize(d);
		urlDest.setMinimumSize(d);
		urlDest.setName ("URL Destinations");
		//Validator<Document> dd = Validators.forDocument(true, Validators.URL_MUST_BE_VALID);
		//pnl.getValidationGroup().add (urlDest, dd);
		gc.gridx = 1;
		gc.gridy = 0;
		add(urlDest, gc);
		
		
	}
}
